package zhaoxiaohan;

import spring.AnnotationConfigApplicationContext;import spring.ApplicationContext;
import zhaoxiaohan.service.OrderService;
import zhaoxiaohan.service.UserService;

public class Test {

    public static void main(String[] args) {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
        //Object s = applicationContext.getBean("s");
        OrderService orderService = (OrderService) applicationContext.getBean("orderService");
        UserService userService = (UserService) applicationContext.getBean("userService");
        //System.out.println(userService);
        //System.out.println(orderService);
        System.out.println("userService = " + userService.getOrderService());
        //System.out.println("orderService = " + orderService.getUserService());
        userService.hello();
    }

}
